<?php
	$user = $this->controller->getUser();
	
	$vote_info = $this->layout()->vote_info;
	$vote_list = array();
	foreach($vote_info as $thread_id=>$thread){
		$now = time();
		foreach($thread as $phase_id=> $phase){
			if($phase->view_enable==1){
				$vname = $phase->thread_name;
				$vid = $thread_id."_".$phase_id;
				$vote_list[] = array("name"=>$vname, "votephoto_category"=>$phase->votephoto_category, "vid"=>$vid, "thid"=>$thread_id, "pid"=>$phase_id);
			}
		}
		
	}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><?echo ($this->layout()->title!="" ? $this->escape($this->layout()->title) : "") ?></title>
	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="generator" content="">
	<link rel="SHORTCUT ICON" href="<?php echo EVENT_STATIC_SERVER;?>/images/favicon.ico"/>
	<script type="text/javascript">

		var fadeimages=new Array()
		<?php 
		$totalImg = 23;
		for($i=0; $i<$totalImg; $i++){
		?>
		fadeimages[<?php echo $i;?>]=["<?php echo $this->layout()->spath;?>/slide/<?php echo str_pad($i+1, 3, '0', STR_PAD_LEFT);?>.jpg", "", ""]
		<?php
		}
		?>
	</script>
    <!--Import CSS files:-->
    <link href="<?php echo $this->layout()->spath; ?>/css/style.css" rel="stylesheet" type="text/css" /> 
    <!--End css files-->
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/swfobject.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/jquery.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/event_cover_comment.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/fadeimage.js"></script>

   <!--[if lt IE 7]>
        <script defer type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/pngfix.js"></script>
        <link href="<?php echo EVENT_STATIC_SERVER;?>/css/ie6fix.css" rel="stylesheet" type="text/css" />
    <![endif]-->        


</head>
<body>
<div id="home" class="page-center">
    <!--menu tamtay.vn-->
     <div id="menu_tt" class="tex_menu_tt">
        <div class="menu_tt-left">
           <a href="http://www.tamtay.vn">Tamtay.vn</a> | 
           <a href="http://video.tamtay.vn">Video</a> | 
           <a href="http://photo.tamtay.vn">Ảnh</a> | 
           <a href="http://music2.tamtay.vn">Nhạc</a> | 
           <a href="http://blog.tamtay.vn">Blog</a> | 
           <a href="http://www.tamtay.vn/event">Sự kiện</a> | 
           <a href="http://www.tamtay.vn/bookmark/home">Web hay</a> | 
           <a href="http://www.tamtay.vn/group">Nhóm</a> | 
           <a href="http://www.tamtay.vn/network/home">Network</a> | 
           <a href="http://www.tamtay.vn/group/forum">Diễn đàn</a> | 
        </div>
           
        <div style="padding-top:0px" class="menu_tt-right">
            <?php if (!$user->uid) {?>
            <a href="<?php echo IDS_LOGIN_URL;?>">Đăng nhập</a> | 
            <a href="<?php echo IDS_REGISTER_URL;?>">Đăng ký</a>
            <?php } else {
                ?>
                Chào <strong style="color: rgb(206, 175, 25);"> <?php echo $user->name;?> </strong> - <a href="<?php echo IDS_LOGOUT_URL;?>">Thoát</a>
            <?php
            } ?>    
          </div>
     </div>

     <!--benner-->     
     <?php //displayBanner($event->eid, "header-1");?>
     <div id="banner">
         <div class="clear"></div>
         <a href="http://photo.tamtay.vn/upload?cat=123823" class="up_images">Đăng ảnh ngay</a>
         <span class="sub_intro">tamtay.vn/home...</span>
     </div>
     
     <!--menu_event-->     
    <div class="menu_event">
       <span><a href="/event/<?php echo $this->layout()->short_cut; ?>">Trang chủ</a></span><img src="<?php print $this->layout()->spath; ?>/images/gach.jpg">
       <span><a href="/event/<?php echo $this->layout()->short_cut; ?>/desc">Giới thiệu</a></span><img src="<?php print $this->layout()->spath; ?>/images/gach.jpg">
       <span><a href="/event/<?php echo $this->layout()->short_cut; ?>#mark_news">Tin tức</a></span><img src="<?php print $this->layout()->spath; ?>/images/gach.jpg">
       <?php 
       for($i=0; $i<count($vote_list); $i++){
            $vote = $vote_list[$i];
            if($vote["votephoto_category"] > 0){
            ?>
            <span><a href="http://photo.tamtay.vn/category/browse/<?php echo $vote["votephoto_category"];?>" title="Tin tức"><?=$vote["name"];?></a></span><img src="<?php print $this->layout()->spath; ?>/images/gach.jpg">
        <?php }else {?>
            <span><a href="/event/<?php echo $this->layout()->short_cut; ?>/votedlist/<?php echo $vote["thid"]."/".$vote["pid"];?>" title="Tin tức"><?=$vote["name"];?></a></span><img src="<?php print $this->layout()->spath; ?>/images/gach.jpg">
        <?php 
            } // End of if
        } ?>
        
       <span><a href="http://blog.tamtay.vn/homesweethome/blog">Hướng dẫn bình chọn</a></span>
       <!--div mo-->
    </div>
    
    
    <div id="nodung" class="noidung">
         <?php echo $this->layout()->content;?>
         <div class="clear"></div>
         
         <div class="ft_bg">  
            <img src="<?php print $this->layout()->spath; ?>/images/ft_left_corn.jpg" width="20" height="96" alt="" class="ft_left_corn" />
                  <span class="ft_1px">
                  <span class="ft_copy">Giấy phép ICP của Bộ Thông tin và Truyền thông số: 531/GP-CBC © Copyright 2007 TAMTAY.VN All rights reserved. <br />
        Ghi rõ nguồn "Tamtay.vn" khi bạn phát hành lại thông tin từ website này.</span>    
                 </span>
            <img src="<?php print $this->layout()->spath; ?>/images/ft_right_corn.jpg" width="17" height="96" alt="" style="float:left;" />
           </div><br /><br />
             <!--div-->
        </div>
    </div>

</div>


</body>
</html>